Optimal. Leaf size=203 \[ -\frac {5 \sqrt {a} (c+d)^3 \tan ^{-1}\left (\frac {\sqrt {a} \sqrt {d} \cos (e+f x)}{\sqrt {a+a \sin (e+f x)} \sqrt {c+d \sin (e+f x)}}\right )}{8 \sqrt {d} f}-\frac {5 a (c+d)^2 \cos (e+f x) \sqrt {c+d \sin (e+f x)}}{8 f \sqrt {a+a \sin (e+f x)}}-\frac {5 a (c+d) \cos (e+f x) (c+d \sin (e+f x))^{3/2}}{12 f \sqrt {a+a \sin (e+f x)}}-\frac {a \cos (e+f x) (c+d \sin (e+f x))^{5/2}}{3 f \sqrt {a+a \sin (e+f x)}} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.26, antiderivative size = 203, normalized size of antiderivative = 1.00, number of steps
used = 5, number of rules used = 3, integrand size = 29, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.103, Rules used = {2849, 2854,
211} \begin {gather*} -\frac {5 \sqrt {a} (c+d)^3 \text {ArcTan}\left (\frac {\sqrt {a} \sqrt {d} \cos (e+f x)}{\sqrt {a \sin (e+f x)+a} \sqrt {c+d \sin (e+f x)}}\right )}{8 \sqrt {d} f}-\frac {5 a (c+d)^2 \cos (e+f x) \sqrt {c+d \sin (e+f x)}}{8 f \sqrt {a \sin (e+f x)+a}}-\frac {5 a (c+d) \cos (e+f x) (c+d \sin (e+f x))^{3/2}}{12 f \sqrt {a \sin (e+f x)+a}}-\frac {a \cos (e+f x) (c+d \sin (e+f x))^{5/2}}{3 f \sqrt {a \sin (e+f x)+a}} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 211
Rule 2849
Rule 2854
Rubi steps
\begin {align*} \int \sqrt {a+a \sin (e+f x)} (c+d \sin (e+f x))^{5/2} \, dx &=-\frac {a \cos (e+f x) (c+d \sin (e+f x))^{5/2}}{3 f \sqrt {a+a \sin (e+f x)}}+\frac {1}{6} (5 (c+d)) \int \sqrt {a+a \sin (e+f x)} (c+d \sin (e+f x))^{3/2} \, dx\\ &=-\frac {5 a (c+d) \cos (e+f x) (c+d \sin (e+f x))^{3/2}}{12 f \sqrt {a+a \sin (e+f x)}}-\frac {a \cos (e+f x) (c+d \sin (e+f x))^{5/2}}{3 f \sqrt {a+a \sin (e+f x)}}+\frac {1}{8} \left (5 (c+d)^2\right ) \int \sqrt {a+a \sin (e+f x)} \sqrt {c+d \sin (e+f x)} \, dx\\ &=-\frac {5 a (c+d)^2 \cos (e+f x) \sqrt {c+d \sin (e+f x)}}{8 f \sqrt {a+a \sin (e+f x)}}-\frac {5 a (c+d) \cos (e+f x) (c+d \sin (e+f x))^{3/2}}{12 f \sqrt {a+a \sin (e+f x)}}-\frac {a \cos (e+f x) (c+d \sin (e+f x))^{5/2}}{3 f \sqrt {a+a \sin (e+f x)}}+\frac {1}{16} \left (5 (c+d)^3\right ) \int \frac {\sqrt {a+a \sin (e+f x)}}{\sqrt {c+d \sin (e+f x)}} \, dx\\ &=-\frac {5 a (c+d)^2 \cos (e+f x) \sqrt {c+d \sin (e+f x)}}{8 f \sqrt {a+a \sin (e+f x)}}-\frac {5 a (c+d) \cos (e+f x) (c+d \sin (e+f x))^{3/2}}{12 f \sqrt {a+a \sin (e+f x)}}-\frac {a \cos (e+f x) (c+d \sin (e+f x))^{5/2}}{3 f \sqrt {a+a \sin (e+f x)}}-\frac {\left (5 a (c+d)^3\right ) \text {Subst}\left (\int \frac {1}{a+d x^2} \, dx,x,\frac {a \cos (e+f x)}{\sqrt {a+a \sin (e+f x)} \sqrt {c+d \sin (e+f x)}}\right )}{8 f}\\ &=-\frac {5 \sqrt {a} (c+d)^3 \tan ^{-1}\left (\frac {\sqrt {a} \sqrt {d} \cos (e+f x)}{\sqrt {a+a \sin (e+f x)} \sqrt {c+d \sin (e+f x)}}\right )}{8 \sqrt {d} f}-\frac {5 a (c+d)^2 \cos (e+f x) \sqrt {c+d \sin (e+f x)}}{8 f \sqrt {a+a \sin (e+f x)}}-\frac {5 a (c+d) \cos (e+f x) (c+d \sin (e+f x))^{3/2}}{12 f \sqrt {a+a \sin (e+f x)}}-\frac {a \cos (e+f x) (c+d \sin (e+f x))^{5/2}}{3 f \sqrt {a+a \sin (e+f x)}}\\ \end {align*}
________________________________________________________________________________________
Mathematica [C] Result contains complex when optimal does not.
time = 2.49, size = 391, normalized size = 1.93 \begin {gather*} -\frac {\sqrt {a (1+\sin (e+f x))} \left (\frac {15 (c+d)^3 \left (\log \left (\frac {e^{-i e} \left (2 \sqrt [4]{-1} c-2 (-1)^{3/4} d e^{i (e+f x)}+2 \sqrt {d} \sqrt {2 c e^{i (e+f x)}-i d \left (-1+e^{2 i (e+f x)}\right )}\right )}{\sqrt {d}}\right )-\log \left (\frac {2 e^{\frac {1}{2} i (e-2 f x)} \left ((-1)^{3/4} d+\sqrt [4]{-1} c e^{i (e+f x)}+i \sqrt {d} \sqrt {2 c e^{i (e+f x)}-i d \left (-1+e^{2 i (e+f x)}\right )}\right ) f}{\sqrt {d}}\right )\right ) \left (i \cos \left (\frac {1}{2} (e+f x)\right )+\sin \left (\frac {1}{2} (e+f x)\right )\right ) \sqrt {(\cos (e+f x)+i \sin (e+f x)) (c+d \sin (e+f x))}}{\sqrt {d}}+2 \left (\cos \left (\frac {1}{2} (e+f x)\right )-\sin \left (\frac {1}{2} (e+f x)\right )\right ) (c+d \sin (e+f x)) \left (33 c^2+40 c d+19 d^2-4 d^2 \cos (2 (e+f x))+2 d (13 c+5 d) \sin (e+f x)\right )\right )}{48 f \left (\cos \left (\frac {1}{2} (e+f x)\right )+\sin \left (\frac {1}{2} (e+f x)\right )\right ) \sqrt {c+d \sin (e+f x)}} \end {gather*}
Warning: Unable to verify antiderivative.
[In]
[Out]
________________________________________________________________________________________
Maple [F]
time = 180.00, size = 0, normalized size = 0.00 \[\int \sqrt {a +a \sin \left (f x +e \right )}\, \left (c +d \sin \left (f x +e \right )\right )^{\frac {5}{2}}\, dx\]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Failed to integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [B] Leaf count of result is larger than twice the leaf count of optimal. 419 vs.
\(2 (183) = 366\).
time = 0.74, size = 1311, normalized size = 6.46 \begin {gather*} \left [\frac {15 \, {\left (c^{3} + 3 \, c^{2} d + 3 \, c d^{2} + d^{3} + {\left (c^{3} + 3 \, c^{2} d + 3 \, c d^{2} + d^{3}\right )} \cos \left (f x + e\right ) + {\left (c^{3} + 3 \, c^{2} d + 3 \, c d^{2} + d^{3}\right )} \sin \left (f x + e\right )\right )} \sqrt {-\frac {a}{d}} \log \left (\frac {128 \, a d^{4} \cos \left (f x + e\right )^{5} + a c^{4} + 4 \, a c^{3} d + 6 \, a c^{2} d^{2} + 4 \, a c d^{3} + a d^{4} + 128 \, {\left (2 \, a c d^{3} - a d^{4}\right )} \cos \left (f x + e\right )^{4} - 32 \, {\left (5 \, a c^{2} d^{2} - 14 \, a c d^{3} + 13 \, a d^{4}\right )} \cos \left (f x + e\right )^{3} - 32 \, {\left (a c^{3} d - 2 \, a c^{2} d^{2} + 9 \, a c d^{3} - 4 \, a d^{4}\right )} \cos \left (f x + e\right )^{2} - 8 \, {\left (16 \, d^{4} \cos \left (f x + e\right )^{4} - c^{3} d + 17 \, c^{2} d^{2} - 59 \, c d^{3} + 51 \, d^{4} + 24 \, {\left (c d^{3} - d^{4}\right )} \cos \left (f x + e\right )^{3} - 2 \, {\left (5 \, c^{2} d^{2} - 26 \, c d^{3} + 33 \, d^{4}\right )} \cos \left (f x + e\right )^{2} - {\left (c^{3} d - 7 \, c^{2} d^{2} + 31 \, c d^{3} - 25 \, d^{4}\right )} \cos \left (f x + e\right ) + {\left (16 \, d^{4} \cos \left (f x + e\right )^{3} + c^{3} d - 17 \, c^{2} d^{2} + 59 \, c d^{3} - 51 \, d^{4} - 8 \, {\left (3 \, c d^{3} - 5 \, d^{4}\right )} \cos \left (f x + e\right )^{2} - 2 \, {\left (5 \, c^{2} d^{2} - 14 \, c d^{3} + 13 \, d^{4}\right )} \cos \left (f x + e\right )\right )} \sin \left (f x + e\right )\right )} \sqrt {a \sin \left (f x + e\right ) + a} \sqrt {d \sin \left (f x + e\right ) + c} \sqrt {-\frac {a}{d}} + {\left (a c^{4} - 28 \, a c^{3} d + 230 \, a c^{2} d^{2} - 476 \, a c d^{3} + 289 \, a d^{4}\right )} \cos \left (f x + e\right ) + {\left (128 \, a d^{4} \cos \left (f x + e\right )^{4} + a c^{4} + 4 \, a c^{3} d + 6 \, a c^{2} d^{2} + 4 \, a c d^{3} + a d^{4} - 256 \, {\left (a c d^{3} - a d^{4}\right )} \cos \left (f x + e\right )^{3} - 32 \, {\left (5 \, a c^{2} d^{2} - 6 \, a c d^{3} + 5 \, a d^{4}\right )} \cos \left (f x + e\right )^{2} + 32 \, {\left (a c^{3} d - 7 \, a c^{2} d^{2} + 15 \, a c d^{3} - 9 \, a d^{4}\right )} \cos \left (f x + e\right )\right )} \sin \left (f x + e\right )}{\cos \left (f x + e\right ) + \sin \left (f x + e\right ) + 1}\right ) + 8 \, {\left (8 \, d^{2} \cos \left (f x + e\right )^{3} - 2 \, {\left (13 \, c d + d^{2}\right )} \cos \left (f x + e\right )^{2} - 33 \, c^{2} - 14 \, c d - 13 \, d^{2} - {\left (33 \, c^{2} + 40 \, c d + 23 \, d^{2}\right )} \cos \left (f x + e\right ) - {\left (8 \, d^{2} \cos \left (f x + e\right )^{2} - 33 \, c^{2} - 14 \, c d - 13 \, d^{2} + 2 \, {\left (13 \, c d + 5 \, d^{2}\right )} \cos \left (f x + e\right )\right )} \sin \left (f x + e\right )\right )} \sqrt {a \sin \left (f x + e\right ) + a} \sqrt {d \sin \left (f x + e\right ) + c}}{192 \, {\left (f \cos \left (f x + e\right ) + f \sin \left (f x + e\right ) + f\right )}}, \frac {15 \, {\left (c^{3} + 3 \, c^{2} d + 3 \, c d^{2} + d^{3} + {\left (c^{3} + 3 \, c^{2} d + 3 \, c d^{2} + d^{3}\right )} \cos \left (f x + e\right ) + {\left (c^{3} + 3 \, c^{2} d + 3 \, c d^{2} + d^{3}\right )} \sin \left (f x + e\right )\right )} \sqrt {\frac {a}{d}} \arctan \left (\frac {{\left (8 \, d^{2} \cos \left (f x + e\right )^{2} - c^{2} + 6 \, c d - 9 \, d^{2} - 8 \, {\left (c d - d^{2}\right )} \sin \left (f x + e\right )\right )} \sqrt {a \sin \left (f x + e\right ) + a} \sqrt {d \sin \left (f x + e\right ) + c} \sqrt {\frac {a}{d}}}{4 \, {\left (2 \, a d^{2} \cos \left (f x + e\right )^{3} - {\left (3 \, a c d - a d^{2}\right )} \cos \left (f x + e\right ) \sin \left (f x + e\right ) - {\left (a c^{2} - a c d + 2 \, a d^{2}\right )} \cos \left (f x + e\right )\right )}}\right ) + 4 \, {\left (8 \, d^{2} \cos \left (f x + e\right )^{3} - 2 \, {\left (13 \, c d + d^{2}\right )} \cos \left (f x + e\right )^{2} - 33 \, c^{2} - 14 \, c d - 13 \, d^{2} - {\left (33 \, c^{2} + 40 \, c d + 23 \, d^{2}\right )} \cos \left (f x + e\right ) - {\left (8 \, d^{2} \cos \left (f x + e\right )^{2} - 33 \, c^{2} - 14 \, c d - 13 \, d^{2} + 2 \, {\left (13 \, c d + 5 \, d^{2}\right )} \cos \left (f x + e\right )\right )} \sin \left (f x + e\right )\right )} \sqrt {a \sin \left (f x + e\right ) + a} \sqrt {d \sin \left (f x + e\right ) + c}}{96 \, {\left (f \cos \left (f x + e\right ) + f \sin \left (f x + e\right ) + f\right )}}\right ] \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F(-2)]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Exception raised: SystemError} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [F]
time = 0.00, size = -1, normalized size = -0.00 \begin {gather*} \int \sqrt {a+a\,\sin \left (e+f\,x\right )}\,{\left (c+d\,\sin \left (e+f\,x\right )\right )}^{5/2} \,d x \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________